<div class="table_header">
    {phrase var='answer.edit_category'}
</div>
<form action="{url link='admincp.answer.edit'}" method="post">
    <div class="table">
        <div class="table_left">
            {phrase var='answer.name'}
        </div>
        <div class="table_right">
            <input type="text" name="val[name]" value="{value type='input' id='name'}" id="name" size="30" />
            <input type="hidden" name="val[id]" value="{value type='input' id='id'}" id="id" size="30" />
        </div>
    </div>

    <div class="table">
        <div class="table_left">
            {phrase var='answer.parent_name'}
        </div>
        <div class="table_right">
            <select name="val[parent_id]" id="parent_id" style="width: 300px;">
                <option value="0">{phrase var='answer.root'}</option>
                {foreach from=$aCategoriesCombo item=aItem}
                <option value="{$aItem.id}"{if $aItem.id == $aForms.parent_id} selected="selected" {/if}>{$aItem.name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="table_clear">
        <input type="submit" value="{phrase var='answer.submit'}" class="button" name="add_category">
    </div>
</form>
<br>
{module name='answer.admincp.category'}